package com.lysj.website.website.domain;

import com.lysj.website.common.spring.base.BaseEntity;
import com.lysj.website.common.validation.annotation.NotBlank;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * @ Author ：drj.
 * @ Date  ：Created in 15:18 2019/10/25
 * @ Description:
 **/
@Data
@Entity
@EqualsAndHashCode(callSuper = true)
@Table(name = "lysj_website_website")
public class Website extends BaseEntity {

    @NotBlank(message = "请填写姓名")
    private String name;//姓名
    @NotBlank(message = "请填写电话")
    private String phone;//电话
    private String province;//省份
    private String city;//城市
    private String ip;//ip

    @DateTimeFormat(pattern = "yyyy-MM-dd")//将String转换成Date，一般前台给后台传值时用
    private Date start_createTime;//创建时间 数据插入时自动赋值


    @DateTimeFormat(pattern = "yyyy-MM-dd")//将String转换成Date，一般前台给后台传值时用
    private Date end_createTime;//创建时间 数据插入时自动赋值
}
